package com.erp.remote.information;

import com.erp.entity.information.Company;
import com.erp.util.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@RequestMapping("/information/company")
public interface CompanyRemote {

    @RequestMapping("allCompany")
    AjaxResult allCompany();

    /**
     * 传入邮箱，校验是否唯一
     * @param email
     * @return
     */
    @PostMapping("/selectCountByEmail")
    AjaxResult selectCountByEmail(@RequestParam("email") String email);

    @PostMapping("/checkPassword")
    AjaxResult checkPassword(@RequestParam("accountCode") String accountCode);

    @PostMapping("/addCompany")
    AjaxResult addCompany(@RequestBody Company company);

    @PostMapping("/selectByEmail")
    AjaxResult selectByEmail(@RequestParam("email") String email);

    @PostMapping("/updateCompany")
    AjaxResult updateCompany(@RequestBody Company company);

    @PostMapping("/getReAndPayTicket")
    AjaxResult getReAndPayTicket(@RequestParam("companyId") Integer companyId);

    @PostMapping("/getPurchaseAndSale")
    AjaxResult getPurchaseAndSale(@RequestParam("companyId") Integer companyId);
}
